pkgname=gbox
pkgver=2.1b
pkgrel=1
arch=('i686')
pkgdesc="A powerful CAM emulator"
url="http://www.dreamboxworld.com/"
license=('GPL')
depends=('glibc')
backup=('etc/gbox/cs2gbox.cfg' 'etc/gbox/ignore.list' 'etc/gbox/conax' \
	'etc/gbox/irdeto' 'etc/gbox/knowns.ini' 'etc/gbox/nagra' \
	'etc/gbox/nds' 'etc/gbox/seca' 'etc/gbox/softcam.cfg' 'etc/gbox/via' \
	'etc/gbox/cwshare.cfg' 'etc/gbox/gbox_cfg' 'etc/conf.d/gbox' \
	'etc/gbox/ident.info')
install=gbox.install
source=(gboxx86 cs2gbox.x86 gbox.rc cs2gbox.rc cs2gbox.cfg ignore.list conax \
	irdeto knowns.ini nagra nds seca softcam.cfg via cwshare.cfg gbox_cfg \
	gbox.conf ident.info)
md5sums=('7d22d9093fd1801dd61baf0fe4921c28'
         'd85c94d1c8708ba3341b93ebddcdb866'
         '330ab23574ed8a3ceb67fdd9128b1514'
         '5b197377a82f4e5fe4196d75504633e9'
         '9f83e4d8473ccf056378323ddff33eaa'
         'e73f6b0fc2a47e46762c4205c7deffeb'
         '10c54d4ada1940d72b464d4de9bfc5c0'
         '57ca02ffc8934ab7863b92b652467863'
         '9ff07448c7f408370dd41392b5da93eb'
         '631e194d40dd924b779250e533356d02'
         '02171ea8588e97d16000037aa52dea80'
         '2c058ad2bf2fb8fd0325412065509ae8'
         '5735fff1640e1426f0a235e4bbe4bfb6'
         'e7e0adfa122f3f60011e5b78eaa778db'
         '0a6bf4dbd8e53be3d1e6261a45ac5d17'
         '3045cda2f338013a2ac3761aad34f883'
         '9566b721352004a24538bccb9113d78b'
         '20170d33742503161512c700b26d1687')

build() {
  cd $startdir/src

  install -d $startdir/pkg/{etc/{gbox,rc.d,conf.d},usr/bin}
  install -m 755 gboxx86 cs2gbox.x86 $startdir/pkg/usr/bin
  install -m 755 gbox.rc $startdir/pkg/etc/rc.d/gbox
  install -m 755 cs2gbox.rc $startdir/pkg/etc/rc.d/cs2gbox
  install -m 644 gbox.conf $startdir/pkg/etc/conf.d/gbox
  install -m 644 ignore.list conax irdeto knowns.ini nagra nds seca \
		 via softcam.cfg cs2gbox.cfg cwshare.cfg \
		 gbox_cfg ident.info $startdir/pkg/etc/gbox
  touch $startdir/pkg/etc/gbox/ecm.info
  touch $startdir/pkg/etc/gbox/{gbox.ver,{pid,sc}.info,share.{info,onl}}
  chmod 700 $startdir/pkg/etc/gbox
}
